<?php
namespace app\index\controller;
use app\index\controller\Base;
use think\Db;
use app\index\model\blog;
class Index extends Base
{
    public function index()
    {
        $base = new Base();
        $base->bloginfo();
        $newartice = blog::
        where('type', '=', 'artice')
        ->where('show', '=', '1')
        ->order('time','desc')
        ->paginate(5);
        // 获取分页显示
        $page = $newartice->render();
        $this->assign('page', $page);
        $this->assign('newartice',$newartice);
        return $this->fetch('./index/index');
    }
}
